This invention generally relates to a method for allowing verification of alterations to the cataloging structure of a computer storage device for the purpose of determining the beneficial effect of the alterations prior to implementing them.
In a computer system, when information is stored on a storage device, it is cataloged so that the information can be retrieved when desired. Each separate body of information is termed a file. Various filing systems have been devised to maintain a directory of the files and the addresses on the device where their information is actually stored. Each file is retrieved using its associated name. A hierarchical filing system uses a starting, or root, directory, which can contain files and additional directories. Each additional directory is also capable of containing files and additional directories.
A filing system is comprised of a cataloging structure. The file and directory information in the cataloging structure is known as catalog data. There are many different filing systems using a variety of cataloging structures. A common problem affecting cataloging structures is their susceptibility to corruption. Corruption can occur for many reasons, including hardware failure and software bugs. As a result of the corruption, files, or even the entire storage device may be rendered inaccessible. Another common problem affecting sophisticated cataloging structures is that adding, deleting and modifying catalog data will typically result in inefficient storage of the catalog data within the cataloging structure. Examples of sophisticated cataloging structures are the Hierarchical File System (HFS) developed by Apple Computer, Inc. of Cupertino, Calif. (as described in U.S. Pat. No. 4,945,475, Bruffey et al.), and the High Performance File System (HPFS) developed by Microsoft Corporation of Redmond, Wash. (as described in U.S. Pat. No. 5,371,885, Letwin). The storage inefficiency results in a significant increase in the amount of time required to access catalog data.
Numerous computer programs (xe2x80x9cstorage utilitiesxe2x80x9d) have been written that alter cataloging structures to repair corruption or to correct storage inefficiencies. Storage utilities that repair cataloging structures are often unable to correctly diagnose corruption to a sophisticated cataloging structure. Incorrect diagnosis results in incorrect repairs, often making the corruption worse. Further, because countless possible combinations of corruption can occur, those skilled in the art are unable to create a patching-type repair program that can repair all the corruption. A storage utility that corrects cataloging structure storage inefficiencies can make improper alterations to a cataloging structure due to corruption in the cataloging structure. Improper alterations to a corrupt cataloging structure are undesirable because they typically make the corruption worse. For example, files that were previously accessible may become inaccessible. In an extreme case, an entire storage device may be rendered inaccessible.
In an attempt to offer a user the ability to change his mind after making alterations to a cataloging structure, some storage utilities that repair corrupt cataloging structures now provide an option to undo the alterations. The undo method relies upon storing a copy of the original, unaltered cataloging structure on a separate, nonvolatile storage device (such as a hard disk) and later using the copy to restore the altered cataloging structure to the unaltered state.
The undo method is not a satisfactory solution to the problem caused by undesirable alterations. First, a separate nonvolatile storage device on which to store a copy of the unaltered cataloging structure may not exist. Secondly, an existing separate nonvolatile storage device may not have sufficient free storage to contain a copy of the original cataloging structure. Thirdly, files and directories in the altered cataloging structure may have been further altered by another program in the interim before the undo option is selected. Additionally, new files and directories may have been added to the altered cataloging structure and would be lost if the cataloging structure were restored to the unaltered state. For these reasons, the undo method can cause information on the storage device to become inaccessible.
An object of the present invention is to allow verification of alterations to the cataloging structure of a computer storage device by facilitating the use of a copy of the cataloging structure containing the alterations. The copy can be located on any type of writable storage device or in memory.
Another object of the present invention is to allow access to and examination of files and directories that are inaccessible, specifically when the present invention is used in conjunction with a storage utility that repairs cataloging structures.
An additional object of the present invention is to facilitate a comparison of the altered cataloging structure and the original cataloging structure.
Another object of the present invention is to prevent undesired alterations from being made to a storage device with a corrupt cataloging structure when such alterations would prevent the information contained on the storage device from being retrieved by using methods other than repairing the cataloging structure.
The objects of the present invention are accomplished by intercepting accesses to a storage device such that read accesses to the cataloging structure of the storage device are redirected to an alternate cataloging structure, and write accesses to the cataloging structure of the storage device are denied. Read accesses to other locations of the storage device are not redirected, but write accesses are denied. As a result, the storage device is entirely read-only, and the alternate cataloging structure functions as a read-only cataloging structure for the storage device containing the original cataloging structure.
Storage utilities that incorporate the present invention will make alterations to a copy of the cataloging structure of a storage device. This altered cataloging structure is located separately from the original cataloging structure, whether in the storage device containing the original cataloging structure, another storage device, or the memory. Upon request, the present invention can make the altered cataloging structure function as the cataloging structure for the storage device containing the original cataloging structure. The alterations to the cataloging structure can then be verified, by a computer program or by a computer operator, to determine if the alterations are desired.
If the present invention is used with a storage utility that repairs corrupt cataloging structures, then the altered cataloging structure will contains the repairs. Since the repaired cataloging structure functions as the cataloging structure for the storage device, files and directories that were previously inaccessible will be accessible.
Finally, the present invention allows access to the original cataloging structure in order to permit a computer program or a computer operator to compare the original cataloging structure with the altered cataloging structure. If a determination is made that the alterations to the cataloging structure are beneficial, the storage utility that altered the cataloging structure will replace the contents of the original cataloging structure with the contents of the altered cataloging structure. If, however, a determination is made that the alterations to the cataloging structure are not desired, then the original cataloging structure remains unchanged. Because the altered cataloging structure and the storage device are read-only, no information can be lost because no other program can have modified the storage device while the altered cataloging structure was functioning as the cataloging structure for the device. Whether or not the original cataloging structure is replaced, the present invention is requested to stop redirecting access to the altered cataloging structure, and the storage utility that altered the cataloging structure disposes of the altered cataloging structure.